home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 May / EnigmA AMIGA RUN 18 (1997)(G.R. Edizioni)(IT)[!][issue 1997-05][EAR-CD II].iso / softwareupdate / system / amigados / amigadoslibrary / freedosobject.c < prev    next >
C/C++ Source or Header  |  1996-10-10  |  829b  |  35 lines

  1. /* FreeDosObject.c   V1.0   93-09-27                        */
  2. /* ROM library: "dos.library/FreeDosObject", (All versions) */
  3. /* Copyright 1993, Anders Bjerin, Amiga C Club              */
  4.  
  5. #include <dos/dos.h>
  6.  
  7. #include <clib/dos_protos.h>
  8. #include <stdio.h>
  9. #include <stdlib.h>
  10.  
  11. UBYTE *version = "$VER: FreeDosObject 1.0";
  12.  
  13. int main( int argc, char *argv[] );
  14. int main( int argc, char *argv[] )
  15. {
  16.   /* Pointer to our dos object (FileInfoBlock) which we will allocate: */
  17.   struct FileInfoBlock *my_fib;
  18.  
  19.  
  20.   /* Create a dos object (FileInfoBlock structure): */
  21.   my_fib = AllocDosObject( DOS_FIB, NULL );
  22.   if( !my_fib )
  23.   {
  24.     printf( "Could not allocate the FileInfoBlock!\n" );
  25.     exit( 20 );
  26.   };
  27.  
  28.   /* Use the allocated object... */
  29.  
  30.   /* Deallocate the dos object: */
  31.   FreeDosObject( DOS_FIB, my_fib );
  32.  
  33.   exit( 0 );
  34. }
  35.